package com.aidex.business.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.BaseEntity;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.business.mapper.BusSalesMapper;
import com.aidex.business.domain.BusSales;
import com.aidex.business.service.BusSalesService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 销售单信息Service业务层处理
 * @author cq
 * @email 382425530@qq.com
 * @date 2023-06-20
 */
@Service
@Transactional(readOnly = true)
public class BusSalesServiceImpl extends BaseServiceImpl<BusSalesMapper, BusSales> implements BusSalesService {

    private static final Logger log = LoggerFactory.getLogger(BusSalesServiceImpl.class);

    /**
     * 获取单条数据
     * @param busSales 销售单信息
     * @return 销售单信息
     */
    @Override
    public BusSales get(BusSales busSales) {
        BusSales dto = super.get(busSales);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 销售单信息id
     * @return 销售单信息
     */
    @Override
    public BusSales get(String id) {
        BusSales dto = super.get(id);
        return dto;
    }

    /**
     * 查询销售单信息列表
     * @param busSales 销售单信息
     * @return 销售单信息
     */
    @Override
    public List<BusSales> findList(BusSales busSales) {
		List<BusSales> busSalesList = super.findList(busSales);
        return busSalesList;
    }

    /**
     * 分页查询销售单信息列表
     * @param busSales 销售单信息
     * @return 销售单信息
     */
    @Override
    public PageInfo<BusSales> findPage(BusSales busSales) {
		PageInfo<BusSales> page = super.findPage(busSales);
        return page;
    }

    /**
     * 保存销售单信息
     * @param busSales
     * @return 结果
     */
    @Override
    public boolean save(BusSales busSales) {
        return super.save(busSales);
    }

    /**
     * 删除销售单信息信息
     * @param busSales
     * @return 结果
     */
    @Override
    public boolean remove(BusSales busSales) {
        return super.remove(busSales);
    }

    /**
     * 批量删除销售单信息
     * @param ids 需要删除的销售单信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBusSalesByIds(String[] ids) {
        return mapper.deleteBusSalesByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

}
